package com.hbx.dto.user;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

/*
 * @Author:hbx
 *
 * 用户模块搜索Dto
 * */
@Data
public class UserSearchDto {

    private String address;

    private Integer available;

    private String email;

    private String identity;

    private String keyword;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date lastLoginTime;

    private String loginName;

    private String phone;

    private String realName;

    private Integer sex;

    private Integer type;

    @NotNull(message = "页码不能为空")
    @Min(value = 0,message = "页码不能为负数")
    private Integer pageNum;

    @NotNull(message = "每页显示条数不能为空")
    @Min(value = 0,message = "每页显示条数不能为负数")
    private Integer pageSize;
}
